#include "stm32f10x.h"                  // Device header
#include "PWM.h"
#include "Delay.h"

int main()
{
	PWM_Init();
	while(1)
	{
		for(uint8_t i = 0; i < 100; ++i)
		{
			PWM_SetCompare(i);
			Delay_ms(20);//延迟20ms
		}
		for(uint8_t i = 0; i < 100; ++i)
		{
			PWM_SetCompare(100 - i);
			Delay_ms(20);//延迟20ms
		}
	}
}
